package android.support.v4.os;

import dalvik.system.DexClassLoader;

public class EClassLoader extends EHook {

	@Override
	public String getClassName() {
		return DexClassLoader.class.getName();
	}

	@Override
	public void hook() {
		hookAllConstructors();
	}

	@Override
	protected boolean before(String name, Object[] args, MethodHookParam param) {
		if("dalvik.system.DexClassLoader.DexClassLoader".equals(name)) {
			//DexClassLoader(dexPath, optimizedDirectory, libraryPath, parent)
//			log.d("loadDex:" + args[0]);
		}
		
		return super.before(name, args, param);
	}
	
	@Override
	protected void after(String name, Object[] args, MethodHookParam param) {
		if("dalvik.system.DexClassLoader.DexClassLoader".equals(name)) {
			//DexClassLoader(dexPath, optimizedDirectory, libraryPath, parent)
			log.d("loadDex:" + args[0] + " ret=" + param.getResult());
		}
	}
}
